<div class="container-wrapper">
    <h2>编辑笔记</h2>
  <form action="/upd-note" method="post">
    <table>
      <tbody>
      {{#if titleError}}
      <tr>
        <td>标题不能为空</td>
      </tr>
      {{/if}}
      <tr>
        <td>
          <!-- 添加一个隐藏字段来存储 note 对象的 id -->
          <input type="hidden" name="id" value="{{ note._id }}">
        </td>
      </tr>
      <tr>
      <tr>
        <td>
          *<input class="input" type="text" placeholder="笔记标题" name="title" value={{ note.title }} >
        </td>
        <td>
  <select name="week" class="icon-select">
    <option value="">全部</option>
    <option value="1" {{#if (eq note.week 1)}}selected{{/if}}>星期一</option>
    <option value="2" {{#if (eq note.week 2)}}selected{{/if}}>星期二</option>
    <option value="3" {{#if (eq note.week 3)}}selected{{/if}}>星期三</option>
    <option value="4" {{#if (eq note.week 4)}}selected{{/if}}>星期四</option>
    <option value="5" {{#if (eq note.week 5)}}selected{{/if}}>星期五</option>
    <option value="6" {{#if (eq note.week 6)}}selected{{/if}}>星期六</option>
    <option value="7" {{#if (eq note.week 7)}}selected{{/if}}>星期日</option>
  </select>
  </td>
  <td>
  <select name="weather" class="icon-select">
    <option value="">全部</option>
    <option value="1" {{#if (eq note.weather 1)}}selected{{/if}}>晴天</option>
    <option value="2" {{#if (eq note.weather 2)}}selected{{/if}}>多云</option>
    <option value="3" {{#if (eq note.weather 3)}}selected{{/if}}>阴天</option>
    <option value="4" {{#if (eq note.weather 4)}}selected{{/if}}>雨天</option>
    <option value="5" {{#if (eq note.weather 5)}}selected{{/if}}>雪天</option>
    <option value="6" {{#if (eq note.weather 6)}}selected{{/if}}>雷暴</option>
    <option value="7" {{#if (eq note.weather 7)}}selected{{/if}}>温暖</option>
    <option value="8" {{#if (eq note.weather 8)}}selected{{/if}}>凉爽</option>          
  </select>
  </td>         
      </tr>
      </tr>
      <tr>
        <td>
          <textarea placeholder="笔记内容" name="content" rows="10" cols="80">{{ note.content }}</textarea>
        </td>
      </tr>
      <tr>
        <td>
          <input type="reset" text="重置" class="btn btn-default">
        </td>
        <td>
          <input type="submit" text="提交" class="btn btn-primary">
        </td>
      </tr>
      </tbody>
    </table>
  </form>
</div>